package com.lg.product.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lg.common.pojo.ResponseResult;
import com.lg.product.entity.SpecParam;
import com.lg.product.service.ISpecParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 规格参数组下的参数名 前端控制器
 * </p>
 *
 * @author lzk
 * @since 2020-07-22
 */
@RestController
@RequestMapping("/spec-param")
public class SpecParamController {

    @Autowired
    ISpecParamService iSpecParamService;

    @GetMapping("paramSkuAll")
    public ResponseResult paramSkuAll(Long cid){
        QueryWrapper<SpecParam> specParamQueryWrapper = new QueryWrapper<>();
        specParamQueryWrapper.eq("cid",cid);
        specParamQueryWrapper.eq("generic",0);
        return ResponseResult.success(iSpecParamService.list(specParamQueryWrapper));
    }


}
